Messages, triggers, and actions

Control objects (UI components), input manipulators, and messages are the key mechanisms for building interactivity in Kanzi:

The following diagram displays how a Kanzi application manages input in order to invoke actions.

Control objects (UI components)

Control objects (or UI components) are objects that contain specific rules for reacting to input in various ways. They provide a means for building interactivity in Kanzi Studio together with triggers, actions and state managers. Buttons and toggle buttons are the simplest controls in Kanzi and generate button clicked messages based on touch or mouse input. Other controls provide more complex functionality, for example, list boxes for scrollable lists.

The list of default controls in Kanzi includes: Button, Toggle button, Trajectory list box, Grid list box, Slider, Scroll view, and text. Most have variants for 2D (layers) and 3D scenes.

You can create your own Kanzi controls and implement the logic and functionality required by your application needs with a Kanzi Engine plugin. See Kanzi Engine plugins.

UI components in the Kanzi API

UI components are inherited from the base class KzuUiComponentNode, which in turn is inherited from KzuObjectNode. Implement instances of UI components by setting the component as the parent of objects (usually meshes), so that the objects inherit the behavior from the component.

Input and gesture system

Kanzi provides low and high-level access to input:

Kanzi provides input manipulators to enable gesture recognition for objects in your Kanzi project. You can assign the manipulators through the API.

Message system

The message system provides a way to notify about events and exchange information. At the core of the message system is KzuMessageDispatcher. The dispatcher acts as a mediator between message senders and handlers. It maintains the list of active message handlers and the message queue. You can access the message dispatcher from any object with kzuObjectNodeGetMessageDispatcher(). See Using messages.

See also

Property system

Resource management

Layouts